import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;


public class Program {
	public static void main(String[] args) throws Exception
	{
		String connectionString = "jdbc:mysql://localhost/test";
		
		new com.mysql.jdbc.Driver();
		Connection connection = DriverManager.getConnection(connectionString, "root", "1234");
		
		Statement st = connection.createStatement();
		st.execute("SELECT * FROM table_test");
		
		ResultSet rs = st.getResultSet();
		while(rs.next())
		{
			System.out.println( rs.getInt("ID"));
			System.out.println( rs.getString("hello1"));
			System.out.println( rs.getString("hello2"));
		}
		connection.close();
	}
}
